import QtQuick
import FluentUI
import QtQuick.Layouts
import QtQuick.Controls

FluWindow {
    id: mainWindow
    width: 1200
    height: 675
    minimumWidth: 640
    minimumHeight: 360
    backgroundColor: "#F2F8FC"

    property real fontSizeFactor: mainWindow.width / 1200
    property string currentPage: "home"

    Row {
        x: mainWindow.width * 0.02;
        spacing: mainWindow.width * 0.02
        width: mainWindow.width
        height: mainWindow.height

        // Dock栏
        Loader {
            width: mainWindow.width * 0.13
            height: mainWindow.height * 0.95
            source: "Dock.qml"
        }

        // 首页功能区
        Loader {
            id: homeFunctionArea
            width: mainWindow.width * 0.81
            height: mainWindow.height * 0.98

            source:
                if (mainWindow.currentPage === "home") {
                    "home/HomeFuncArea.qml"
                } else if (mainWindow.currentPage === "interview") {
                    "mockInterview/MockInterviewFuncArea.qml"
                } else {
                    ""
                }
        }
    }
}
